home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / bash-1.12 / dist / INSTALL < prev    next >
Encoding:
Text File  |  1991-07-07  |  6.7 KB  |  196 lines

  1. File: bash.info,  Node: Install,  Next: Invoke,     Prev: Built-in,  Up: Top
  2.  
  3. Installing BASH
  4. ***************
  5.  
  6. To install BASH you simply type `make'.     The BASH `Makefile' tries
  7. to dynamically figure out what kind of machine and operating system
  8. you are using.    It makes an educated guess based on the information
  9. it finds.
  10.  
  11. During the `make' process, a message is displayed describing what
  12. machine and operating system has been chosen for you.  This
  13. information is also saved in the file `.machine' so you can look at
  14. it later.
  15.  
  16. Therefore, for most machines, simply follow this simple checklist
  17. to install BASH:
  18.  
  19.   1. Type `make'.
  20.  
  21.   2. Wait for the compilation to finish.
  22.  
  23.   3. Type `./bash' to see if the compile worked.
  24.  
  25.   4. Type `make install DESTDIR=/usr/gnu/bin' (or wherever you
  26.      keep GNU binaries) to copy bash to your binaries directory.
  27.  
  28. * Menu:
  29.  
  30. * Problems::  What to do if BASH doesn't install quite so easily.
  31.  
  32. * Files::     Files used in the `make' process.
  33.  
  34. * Porting::   Porting BASH to a new machine.
  35.  
  36. * Bugs::      What to do if you Discover Bugs in BASH.
  37.  
  38.  
  39. File: bash.info,  Node: Problems,  Next: Files,     Prev: Install,     Up: Install
  40.  
  41. What if it Doesn't Install so Easily?
  42. =====================================
  43.  
  44. Sometimes BASH gets confused and will make the wrong assumptions
  45. about your machine or operating system.     If the displayed
  46. information (also found in `.machine') is incorrect, you will have
  47. to edit the file `machines.h' and provide the appropriate
  48. information so that BASH can be installed correctly.  The complete
  49. instructions for doing this are located in the `machines.h' file.
  50.  
  51. However, if BASH says that your machine type is an
  52. "UNKNOWN_MACHINE", or BASH thought it knew something about your
  53. machine but was wrong, then reading the next few sections could be
  54. of use to you (*note Files::., and *note Porting::., for more
  55. information).
  56.  
  57. On the MIPSEB with the BSD universe, you must:
  58.  
  59. 1) Place /bsd43/bin in your PATH before /bin
  60. 2) Use $(CC) -E instead of /lib/cpp to build cpp-Makefile.
  61.  
  62. File: bash.info,  Node: Files,    Next: Porting,    Prev: Problems,     Up: Install
  63.  
  64. Files Used in the `make' Process.
  65. =================================
  66.  
  67. The following files are used during the installation of BASH, in
  68. the `make' process:
  69.  
  70. `Makefile'
  71.      This is responsible for making the actual `Makefile' that is
  72.      used to create Bash.  It runs the C preprocessor (usually
  73.      located in `/lib/cpp') on the file `cpp-Makefile', producing
  74.      the output file `bash-Makefile'.
  75.  
  76. `cpp-Makefile'
  77.      This is a file of C comments and text.  It contains a
  78.      reasonable number of `ifdefs' which control what files get
  79.      compiled and which flags are passed to the various C files
  80.      comprising BASH.  It includes a file called `machines.h',
  81.      `sysdefs.h', and `config.h'.
  82.  
  83. `machines.h'
  84.      This file contains the basic compilation parameters for all of
  85.      the machines to which BASH has been ported.  This file
  86.      consists of a series of conditional blocks, one per machine
  87.      type.
  88.  
  89.      These conditional blocks are depend upon the unique identifier
  90.      that `cpp' has predefined for this machine.  In some cases,
  91.      additional information can be passed from `Makefile'.  It is
  92.      possible to pass information such as whether or not a
  93.      particular file is available on this system, and so on.
  94.  
  95. `sysdefs.h'
  96.      This file is dynamically made at build time by running the shell
  97.      script `makeargs.sh'.  If there appears to be something wrong in
  98.      this file, then edit the `makeargs.sh' script, and mail the
  99.      changes that you make to bash-maintainers@ai.mit.edu.
  100.  
  101. `bash-Makefile'
  102.      This is the output from the initial stage of `make'.  It is a
  103.      stripped down version of `cpp-Makefile' which is tailor-made
  104.      for your machine and operating system.  All subsequent `makes'
  105.      use this file.
  106.  
  107.  
  108. File: bash.info,  Node: Porting,  Next: Bugs,  Prev: Files,  Up: Install
  109.  
  110. What if You Have to Port to a New Machine?
  111. ==========================================
  112.  
  113. Sometimes you may want to port BASH to a new, previously
  114. unsupported machine.  To do so you need to create a block in
  115. `machines.h' which is conditional based on a unique identifier
  116. present in your version of the C preprocessor.
  117.  
  118. If you don't know what that symbol is, you might try the following
  119. simple test:
  120.  
  121.      echo "main () { }" > foo.c
  122.      cc -v foo.c
  123.  
  124. You are looking for `-DMACHINE', where `MACHINE' is an identifier
  125. for your machine.  If you are very unlucky and your machine's C
  126. preprocessor doesn't have a unique identifier, you will have to
  127. define the identifier in Makefile manually.
  128.  
  129. Let's say you have a machine from Yoyodyne Industries, called the
  130. YoYo.  It runs a version of BSD, so it is reasonably compatible. 
  131. However, the `cpp' on this YoYo machine doesn't define any unique
  132. identifiers.  You should change the `Makefile' line for `CPPFLAGS'
  133. to:
  134.  
  135.      CPPFLAGS = -P -DYoYo
  136.  
  137. Then, in `machines.h', you copy the block for `UNKNOWN_MACHINE',
  138. and change the conditional to;
  139.  
  140.      #if defined (YoYo)
  141.  
  142. Inside of the YoYo block you define `M_MACHINE="YoYo"', and
  143. `M_OS=BSD'.  You also modify the existing defines to match your
  144. machine's software.
  145.  
  146. If BASH still won't compile, perhaps because of missing code that
  147. is required for your YoYo machine, you will have to write that code
  148. and place it within a conditional block based on YoYo.
  149.  
  150. Most machines aren't that difficult; simply redefining a few of the
  151. default values is sufficient.  If you do run across a difficult
  152. machine, please send all fixes and changes to
  153. bash-maintainers@ai.mit.edu in the form of context diffs:
  154.  
  155.      diff -c orig-machines.h machines.h >machines.diffs
  156.  
  157. Please include information about which version of the shell you have.
  158.  
  159.  
  160. File: bash.info,  Node: Bugs,  Prev: Porting,  Up: Install
  161.  
  162. Reporting Bugs
  163. ==============
  164.  
  165. If you find a bug in bash, you should report it.  But first you
  166. should make sure that it really is a bug and that it appears in the
  167. latest version of BASH that is available.
  168.  
  169. Once you have ascertained that a bug really exists, you are welcome
  170. to mail in a bug report.  If you have a fix, please mail that too!
  171.  
  172. Suggestions and "philosophical" bug reports should be mailed to
  173. bug-bash@ai.mit.edu.  Genuine bug reports should be mailed to the
  174. same place, or to bash-maintainers@ai.mit.edu.
  175.  
  176. *All* bug reports should include:
  177.  
  178.    * The version number of BASH.
  179.  
  180.    * The hardware and operating system used.
  181.  
  182.    * The compiler used to compile BASH.
  183.  
  184.    * A description of the bug's behavior.
  185.  
  186.    * A short script or "recipe" which demonstrates the bug.
  187.  
  188. Without this information, it is generally not possible to
  189. successfully debug BASH.  Usually, without this information, the
  190. bug won't manifest itself!
  191.  
  192. Discussion and questions about BASH in general (including questions
  193. about this documentation) can be sent to bash-maintainers@ai.mit.edu.
  194.  
  195.  
  196.